<template>
  <div class="flex items-center gap-1">
    <template v-if="auth">
      <svg-icon icon-class="shouquan" :class="value ? 'text-green-600' : 'text-gray-300'" style="font-size: 16px;" />
      <span :class="value ? 'text-green-600' : 'text-red-600'">{{ value ? '已授权' : '未授权' }}</span>
      <!-- <el-button v-if="!value" link type="primary" @click="emit('auth')">去授权</el-button> -->
    </template>
    <template v-else>
      <svg-icon :icon-class="value ? 'state_finish_line' : 'state_disabled'" :class="value ? 'text-blue-600' : 'text-red-600'" style="font-size: 16px;"/>
    <span>{{ value ? '启用' : '禁用' }}</span>
    </template>
  </div>
</template>

<script setup>
const props = defineProps({
  value: Boolean,
  auth: Boolean,
})

const emit = defineEmits(['auth'])
</script>